<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>订单详情</title>
    <link rel="stylesheet" href="css/_all-skins.min.css"/>
    <link rel="stylesheet" href="css/AdminLTE.min.css"/>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/font-awesome.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/layer.css"/>
</head>
<style>
    .table_base_title {
        background: #666666;
        color: white;
        width: 70px;
    }

    .base_infor {
        height: 120px;
        font-size: 12px;
        background: white;
        margin-top: 20px;
        text-align: center;
    }

    .base_infor1 {
        height: 30px;
        background: #999999;
    }

    .product_num {
        height: 150px;
        margin-top: 20px;
        font-size: 12px;
        text-align: center;
        background: white;
    }

    .product_num td {
        border: solid 1px #C7C7C7;
    }

    .pic_infor {
        height: 170px;
        font-size: 12px;
        margin-top: 20px;
        text-align: center;
        background: white;
    }

    .receiver {
        height: 70px;
        margin-top: 20px;
        background: white;
    }

    .receiver td {
        text-align: center;
        font-size: 12px;
        border: solid 1px #C7C7C7;
    }

    .order_status {
        height: 100px;
        width: 100%;
    }

    .order_status div {
        display: inline-block;

        height: 85px;
        width: 20%;
        float: left;
        text-align: center;
        font-size: 12px;
        position: relative;
    }

    .order_active {
        color: green;
    }

    .order_status i {
        font-size: 30px;
        margin-bottom: 5px;
    }

    .order_status label {
        color: dimgray;
        margin-top: 10px;
    }

    .order_status .fa-long-arrow-right {
        position: absolute;
        top: 20px;
        right: 10px;
    }

    .change_adr {
        background: #3c8dbc;
        color: white;
        border: none;
        padding: 5px;
        border-radius: 4px 4px;
        font-size: 12px;
    }

    .change_btn span {
        display: inline-block;

        width: 70px;
        text-align: center;
        font-weight: bold;
    }

    table {
        min-width: 800px !important;
    }

    .table_data4 td {
        padding-top: 5px;
        padding-bottom: 5px;
        border: solid 1px #C7C7C7;
    }

    .table_data5 {
        text-align: center;
        line-height: 40px;
    }
</style>
<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <div class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->

            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>SuitLove</b></span>
        </div>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">

                            <img src="img/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs  manger-name">Amy</span>

                            <span class="change_password" style="font-size: 12px;margin-left: 40px;">修改密码</span>
                            <span class="exit_login" style="font-size: 12px;">退出登录</span>
                        </a>

                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="img/user2-160x160.jpg" class="img-circle">
                </div>
                <div class="pull-left info">
                    <p class="manger-name">Amy</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <!--<div class="input-group">-->
                    <!--<input type="text" name="q" class="form-control" placeholder="Search...">-->
                    <!--<span class="input-group-btn">-->
                <!--<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>-->
                <!--</button>-->
              <!--</span>-->
                <!--</div>-->
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">功能目录</li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-dashboard"></i> <span>系统首页</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="id_manager.html"><i class="fa fa-circle-o"></i> 账号管理</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-laptop"></i>
                        <span>商品管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="product_list.html"><i class="fa fa-circle-o"></i> 商品列表</a></li>
                        <li><a href="new_product.html"><i class="fa fa-circle-o"></i> 商品新建</a></li>
                        <li><a href="product_kind.html"><i class="fa fa-circle-o"></i> 商品分类</a></li>
                    </ul>
                </li>

                <li class="active treeview">
                    <a href="#">
                        <i class="fa fa-edit"></i> <span>订单管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="hire_order.html"><i class="fa fa-circle-o"></i> 订单列表</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>会员管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 会员记录</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>团购加盟</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="group_buy.html"><i class="fa fa-circle-o"></i> 团购信息</a></li>
                        <li><a href="join_in.html"><i class="fa fa-circle-o"></i> 加盟信息</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>活动管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="activity.html"><i class="fa fa-circle-o"></i> 活动管理</a></li>
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">


        <!-- Main content -->


        <section class="content">
            <div class="row">
                <div class="col-lg-1"></div>
                <div class="col-lg-10">

                    <div class="change_btn">
                        <span>消息变更：</span>
                        <button class="change_adr">变更收货人信息</button>
                    </div>
                    <table class=" col-lg-12 product_num">
                        <tbody>
                        <tr class="base_infor1">
                            <td rowspan="4" class="table_base_title">基本信息</td>
                            <td>订单编号</td>
                            <td>用户手机号</td>
                            <td>订单商品</td>
                            <td>订单数量</td>
                            <td>下单时间</td>
                        </tr>
                        <tr class="table_data1">
                        </tr>
                        <tr class="base_infor1">
                            <td>订单状态</td>
                            <td>发货单号</td>
                            <td>配送物流</td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr class="table_data2">
                        </tr>
                        </tbody>
                    </table>
                    <table class="col-lg-12 receiver">

                        <tbody>
                        <tr class="base_infor1">
                            <td rowspan="2" class="table_base_title">收货人信息</td>
                            <td>姓名</td>
                            <td>手机号</td>
                            <td>邮编</td>
                            <td>收货地址</td>
                        </tr>
                        <tr class="table_data3">
                        </tr>
                        </tbody>
                    </table>
                    <table class="col-lg-12 base_infor">

                        <tbody>
                        <tr class="base_infor1">
                            <td rowspan="2" class="table_base_title table_data4-num">商品信息</td>
                            <td>商品编号</td>
                            <td>商品名</td>
                            <td>商品尺码 / 颜色</td>
                            <td>商品图</td>
                            <td>下单时间</td>
                        </tr>
                        <tr class="table_data4"></tr>
                        </tbody>
                    </table>
                </div>
            </div>


        </section>
        <!-- /.content -->
    </div>

    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 2.0.0
        </div>
        <strong>Copyright &copy; 2018-2019 <a href="http://www.han5j.com/">西安寒武纪信息科技有限公司</a>.</strong> All rights
        reserved.
    </footer>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/adminlte.min.js"></script>
<script type="text/javascript" src="js/moment.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/layer.js"></script>
<script src="js/jq.cookie.js"></script>
<script src="js/change_password.js"></script>
<script>
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }

    var orderNum = GetQueryString('num');
    $.ajax({
        type: "get",
        url: "http://www.puer.zone:30000/OrdersDetailsInfo",
        async: true,
        data: {
            Id: orderNum
        },
        success: function (data) {

            dataView(data);
        }
    });

    function dataView(data) {
        for (var i = 0; i < data[0].length; i++) {
            data[0][i] = (data[0][i] == null) ? "" : data[0][i];
        }
        var tableData1 = `
						<td>${data[0][0]}</td>
	       	 	     	<td>${data[0][1]}</td>
	       	 	     	<td>${data[0][2]}</td>
	       	 	     	<td>${data[0][3]}</td>
	       	 	     	<td>${data[0][4]}</td>
				`;
        $('.table_data1').append(tableData1);

        //
        var tableData2 = `
						<td>${data[0][5]}</td>
	       	 	     	<td>${data[0][6]}</td>
	       	 	     	<td>${data[0][7]}</td>

				`;
        $('.table_data2').append(tableData2);
        ///
        var tableData3 = `
						<td>${data[1][0]}</td>
	       	 	     	<td>${data[1][1]}</td>
	       	 	     	<td>${data[1][2]}</td>
	       	 	     	<td>${data[1][3]}</td>
				`;
        $('.table_data3').append(tableData3);
        ///
        $('.table_data4-num').attr('rowspan', data[2].length + 1)
        for (var i = 0; i < data[2].length; i++) {
            var tableData4 = `
					
					    	<td>${data[2][i][0]}</td>
		       	 			<td>${data[2][i][1]}</td>
		       	 			<td>
		       	 				${data[2][i][2]}
		       	 			</td>
		       	 			<td>
		       	 				<img src="${data[2][i][3]}" height="70px" width="70px"/>
		       	 			</td>
		       	 			<td>${data[2][i][4]}</td>
		       	 		
	       	 		`;
            $('.table_data4').append(tableData4);

        }
        // $('.table_data5').append(data[4]);
        $('.change_adr').click(function () {
            if (data[0][5] == '待发货') {
                layer.open({
                    type: 2,
                    title: false,
                    closeBtn: 1,
                    area: ['360px', '300px'],
                    shade: 0.8,
                    shadeClose: true,
                    anim: 1,
                    id: 'LAY_layuipro',
                    btnAlign: 'c',
                    moveType: 1,
                    content: 'http://www.puer.zone:9000/edit_infor.html?num=' + data[0][0],
                    success: function () {

                    }

                })


            } else {
                layer.msg('只有发起订单时才能修改');
            }
        })
    }


</script>
</body>
</html>
